** Nuclear Weapons and Interstate Conflict: an Empirical Analysis of Conflict Frequency and Intensity  **


/// NOTE: Since the data covers the period from 1816 - 2014, ensure you drop all years prior to 1945 if testing effects in the post-nuclear era ///


/////////////////////// Main Specifications /////////////////////////////

*** TESTING MID INITIATION FREQUENCY for 1945 - 2014; Replication for Table 3 (Rare Event Logisitic Regression) ***

drop if year <1945 

relogit mid joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance 

relogit midforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance 

relogit midforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance if war == 0

relogit midnoforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance 


*** TESTING MID INTENSITY for 1945 - 2014; Replication for Table 4 (Linear Mixed Effects Regression) ***

drop if year <1945  

xtset, clear 
xtset dyadid

xtmixed midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if mid==1 || dyadid: , mle variance 

xtmixed midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if mid==1 || dyadid: , mle variance

xtmixed midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce == 1 || dyadid: , mle variance 

xtmixed midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce == 1 || dyadid: , mle variance

xtmixed midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce == 1 & war == 0 || dyadid: , mle variance

xtmixed midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce == 1 & war == 0 || dyadid: , mle variance

xtmixed midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midnoforce == 1 || dyadid: , mle variance 

xtmixed midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midnoforce == 1 || dyadid: , mle variance



////////////// Robustness Checks for MID Frequency /////////////////

*** TESTING MID INITIATION FREQUENCY for 1945 - 2014; Replication for Table A1 (Mixed Effects Logisitic Regression; time fixed effects included) ***

drop if year <1945 


xtset, clear 
xtset year 

xtmelogit mid joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance || year:

xtmelogit midforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance || year:

xtmelogit midforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance if war == 0 || year:

xtmelogit midnoforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance || year:

*** TESTING MID INITIATION FREQUENCY for 1816 - 2014; Replication for Table A2 (Mixed Effects Regression; time fixed effects included)***

xtset, clear 
xtset year  

xtmelogit mid joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance || year:

xtmelogit midforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance || year:

xtmelogit midforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance if war == 0 || year:

xtmelogit midnoforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance || year:

*** TESTING MID INITIATION FREQUENCY for 1816 - 2014; Replication for Table A3 (Rare Event Logisitic Regression) ***

relogit mid joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance 

relogit midforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance

relogit midforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance if war == 0

relogit midnoforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance


//////////// Robustness Checks for MID Intensity ///////////////////

*** TESTING MID INTENSITY for 1945 - 2014; Replication for Table B1 (GEE Regression) ***

drop if year <1945  

xtset, clear
xtset dyadid year 

xtgee midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if mid==1, family(gaussian) link(identity) corr(independent) i(dyadid) force robust

xtgee midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if mid==1, family(gaussian) link(identity) corr(independent) i(dyadid) force robust 

xtgee midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce==1, family(gaussian) link(identity) corr(independent) i(dyadid) force robust 

xtgee midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce==1, family(gaussian) link(identity) corr(independent) i(dyadid) force robust

xtgee midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce==1 & war==0, family(gaussian) link(identity) corr(independent) i(dyadid) force robust

xtgee midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce==1 & war==0, family(gaussian) link(identity) corr(independent) i(dyadid) force robust

xtgee midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midnoforce==1, family(gaussian) link(identity) corr(independent) i(dyadid) force robust 

xtgee midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midnoforce==1, family(gaussian) link(identity) corr(independent) i(dyadid) force robust



*** TESTING MID INTENSITY for 1816 - 2014; Replication for Table B2 (GEE Regression) ***

xtset, clear
xtset dyadid year 

xtgee midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if mid==1, family(gaussian) link(identity) corr(independent) i(dyadid) force robust

xtgee midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if mid==1, family(gaussian) link(identity) corr(independent) i(dyadid) force robust 

xtgee midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce==1, family(gaussian) link(identity) corr(independent) i(dyadid) force robust 

xtgee midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce==1, family(gaussian) link(identity) corr(independent) i(dyadid) force robust

xtgee midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce==1 & war==0, family(gaussian) link(identity) corr(independent) i(dyadid) force robust

xtgee midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce==1 & war==0, family(gaussian) link(identity) corr(independent) i(dyadid) force robust

xtgee midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midnoforce==1, family(gaussian) link(identity) corr(independent) i(dyadid) force robust 

xtgee midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midnoforce==1, family(gaussian) link(identity) corr(independent) i(dyadid) force robust



*** TESTING MID INTENSITY for 1816 - 2014; Replication for Table B3 (Linear Mixed Effects Regression) ***

xtset, clear 
xtset dyadid

xtmixed midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if mid==1  || dyadid: , mle variance 

xtmixed midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if mid==1  || dyadid: , mle variance

xtmixed midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce == 1 || dyadid: , mle variance 

xtmixed midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce == 1 || dyadid: , mle variance

xtmixed midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce == 1 & war == 0 || dyadid: , mle variance

xtmixed midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce == 1 & war == 0 || dyadid: , mle variance

xtmixed midhihosta joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midnoforce == 1 || dyadid: , mle variance 

xtmixed midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclea contiguity distance fp_similarity joint_democracy power_distribution interdependence if midnoforce == 1 || dyadid: , mle variance


*** Replication for "MID Frequency Coefficient Plot," Figure 2 ***

drop if year <1945  

relogit mid joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance 
estimates store mid_frequency

relogit midforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance
estimates store midforce_frequency 

relogit midforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance if war == 0
estimates store midforce_nowar_frequency

relogit midnoforce joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance 
estimates store midnoforce_frequency

coefplot mid_frequency || midforce_frequency || midforce_nowar_frequency || midnoforce_frequency, drop(_cons contiguity distance fp_similarity joint_democracy power_distribution interdependence mil_alliance)  xline(0) ciopts(recast(rcap)) keep(*:) mlabel format(%12.2g) mlabposition(12) mlabgap(*2) bylabels("All MIDs" "Force MIDs" "Force MIDs; No Wars" "MIDs; No Force (Threats)") coeflabels (joint_nuclear = "Joint Nuclear Dispute" asym_statea_nuclear = "Asymmetric Dispute: Nuclear" asym_stateb_nuclear = "Asymmetric Dispute: Non-Nuclear") xscale(range(-2 4))

*** Replication for "MID Intensity Coefficient Plot," Figure 3 ***

drop if year <1945  

xtset, clear 
xtset dyadid 
xtmixed midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if mid==1 || dyadid: , mle variance
estimates store mid_intensity

xtset dyadid 
xtmixed midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce == 1 || dyadid: , mle variance
estimates store midforce_intensity

xtset dyadid 
xtmixed midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midforce == 1 & war == 0 || dyadid: , mle variance
estimates store midforce_nowar_intensity

xtset dyadid 
xtmixed midhighmcaa joint_nuclear asym_statea_nuclear asym_stateb_nuclear contiguity distance fp_similarity joint_democracy power_distribution interdependence if midnoforce == 1 || dyadid: , mle variance
estimates store midnoforce_intensity

coefplot mid_intensity || midforce_intensity || midforce_nowar_intensity || midnoforce_intensity, drop(_cons contiguity distance fp_similarity joint_democracy power_distribution interdependence)  xline(0) ciopts(recast(rcap)) keep(*:) mlabel format(%12.2g) mlabposition(12) mlabgap(*2) bylabels("All MIDs" "Force MIDs" "Force MIDs; No Wars" "MIDs; No Force (Threats)") coeflabels (joint_nuclear = "Joint Nuclear Dispute" asym_statea_nuclear = "Asymmetric Dispute: Nuclear" asym_stateb_nuclear = "Asymmetric Dispute: Non-Nuclear") xscale(range(-3 3))


//////////////////////// END OF DO FILE ///////////////////////////






